libxl: add definition of INVALID_DOMID to the API
authorPaul Durrant <pdurrant@amazon.com>
Fri, 31 Jan 2020 15:01:43 +0000 (15:01 +0000)
committerWei Liu <wl@xen.org>
Fri, 31 Jan 2020 16:10:46 +0000 (16:10 +0000)
commitbc7b5343053c323e6edf71377d983f0b303a9637
tree21eb853223c019fda21f06e3ff8d2100d7b5a51b
parent4be325e5d4106b9447586cd19dd92a4a78b49598
libxl: add definition of INVALID_DOMID to the API

Currently both xl and libxl have internal definitions of INVALID_DOMID
which happen to be identical. However, for the purposes of describing the
behaviour of libxl_domain_create_new/restore() it is useful to have a
specified invalid value for a domain id.

This patch therefore moves the libxl definition from libxl_internal.h to
libxl.h and removes the internal definition from xl_utils.h. The hardcoded
'-1' passed back via domcreate_complete() is then updated to INVALID_DOMID
and comment above libxl_domain_create_new/restore() is accordingly
modified.

NOTE: The value of INVALID_DOMID (~0) is distinct from the hypervisor's
      DOMID_INVALID. This patch preserves that value.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl.h
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h
tools/xl/xl_utils.h